﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Unit_1_24._10._1015
{
    class Program
    {
        static void Main(string[] args)
        {
            //
            for (int j = 0; j < 10; j++)
            {
                for (int i = 0; i < 20; i++)
                {
                    if (i == 0 || i == 19 || j == 0 || j == 9)
                        Console.Write("o");
                    else
                        Console.Write(" ");
                }
                Console.WriteLine();
            }
            Console.WriteLine();

            //
            for (int i = 0; i < 6; i++)
            {
                for (int j = 0; j < 6; j++)
                {
                    if (j > i)
                        Console.WriteLine(i + " " + j);
                }
            }
            Console.WriteLine(Environment.NewLine);

            //
            //Random r = new Random();
            //for (int i = 0; i < 7; i++)
            //{
            //    Console.WriteLine(r.Next(-5, 6));
            //}

            // para full poker kareta trójka

            while (true)
            {
                byte[] losy = RzutKostka();
                byte[] freq = new byte[6];

                foreach (byte los in losy)
                {
                    Console.Write(los + ", ");
                }
                Console.WriteLine();

                for (int i = 0; i < 5; i++)
                {
                    freq[losy[i] - 1]++;
                }

                //foreach (int i in freq)
                //{
                //    Console.Write(i + ", ");
                //}
                //Console.WriteLine();

                bool marker = false;
                for (int i = 0; i < 6;i++ )
                {   
                    if (freq[i] == 2)
                    {
                        Console.WriteLine("Wystąpiła para: " + (i + 1));
                        marker = true;
                    }
                }
                
                // to do dwie pary, full, kareta, trójka

                if (!marker)
                {
                    Console.WriteLine("Loser !!!!!!!!");
                }
                Console.WriteLine();

                Console.ReadKey();
            }
        }

        static byte[] RzutKostka()
        {
            byte[] losy = new byte[5];

            Random r = new Random();

            for (int i = 0; i < 5; i++)
            {
                losy[i] = (byte)r.Next(1, 7);
            }

            return losy;
        }
    }
}
